package com.sykj.why.mongo.service;

import com.sykj.why.mongo.document.entity.SuccessorProjectT;
import com.sykj.why.mongo.vo.entity.SuccessorProjectTVo;

import java.util.List;

/**
 * @author Eleven
 * @date 2019/6/12
 * @desc 传承人与项目业务访问层
 */

public interface SuccessorProjectTService extends BasicService<SuccessorProjectT> {

    /**
     * 传承人与项目绑定
     * @param successorProjectT
     */
    void saveSuccessorProject(SuccessorProjectT successorProjectT);

    /**
     * 解除传承人与项目绑定
     * @param id
     */
    void removeSuccessorProject(String id);

    /**
     * 修改项目传承信息
     * @param successorProjectT
     */
    void updateSuccessorProject(SuccessorProjectT successorProjectT);


    /**
     * 通过id查询绑定信息
     * @param id
     * @return
     */
    SuccessorProjectT findById(String id);

    /**
     * 通过项目Id查询项目和传承人
     * @param projectId
     * @return
     */
    SuccessorProjectTVo findByProjectId(String projectId);

    /**
     * 通过绑定ID查询传承人信息
     * @param successorProjectId
     * @return
     */
    SuccessorProjectTVo successorDetail(String successorProjectId);

    /**
     * 查询传承人下的传承项目列表
     * @param successorId
     * @return
     */
    List<SuccessorProjectTVo> findListBySuccessor(String successorId);

}
